using Circus.Syntax.CodeCompletion;
using Circus.Syntax.Lexer;
using System;
using System.Drawing;
namespace Circus.Syntax
{
	public class CodeCompletionArgs : EventArgs
	{
		public ICodeCompletionProvider Provider;
		public char KeyChar;
		public CodeCompletionType CompletionType;
		public int Interval;
		public bool Handled;
		public bool NeedShow;
		public bool ToolTip;
		public int SelIndex = -1;
		public bool UseFormat;
		public Point StartPosition;
		public Point EndPosition;
		public Point DisplayPosition;
		public bool NeedReparse;
		public bool AllowAsync = true;
		public bool Notify = true;
        public Circus.Syntax.Lexer.Lexer Lexer;
		public void Init()
		{
			this.CompletionType = CodeCompletionType.None;
			this.Provider = null;
			this.KeyChar = '\0';
			this.ToolTip = false;
			this.Interval = 0;
			this.StartPosition = new Point(-1, -1);
			this.EndPosition = new Point(-1, -1);
			this.DisplayPosition = new Point(-1, -1);
			this.Handled = false;
			this.NeedShow = false;
			this.NeedReparse = true;
			this.SelIndex = -1;
		}
		public void Init(CodeCompletionType completionType, Point position, bool needReparse)
		{
			this.Init();
			this.CompletionType = completionType;
			this.StartPosition = position;
			this.DisplayPosition = position;
			this.NeedReparse = needReparse;
			this.Interval = 0;
		}
		public void Init(CodeCompletionType completionType, Point position)
		{
			this.Init(completionType, position, true);
		}
	}
}
